package com.crazyteam.datasource.dynamic;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

import javax.sql.DataSource;
import java.util.Map;

/**
 * @author guoyang
 * @Date 2018-01-09
 * @Desc 动态数据源事务管理器
 */
public class MuiltDynamicDataSource extends AbstractRoutingDataSource {

    private Map<String, DataSource> supportedDataSources;

    @Override
    public void afterPropertiesSet() {
        super.afterPropertiesSet();
        // TODO
    }

    @Override
    protected Object determineCurrentLookupKey() {
        // TODO
        return null;
    }

    public Map<String, DataSource> getSupportedDataSources() {
        return supportedDataSources;
    }

    public void setSupportedDataSources(Map<String, DataSource> supportedDataSources) {
        this.supportedDataSources = supportedDataSources;
    }
}
